﻿<UserControl x:Class="CapstoneProjectAEReader.GUIs.SettingGUI.Setting"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             mc:Ignorable="d" 
             d:DesignHeight="300" d:DesignWidth="600">
    <Grid x:Name="mainGrid">
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="*"/>
            <ColumnDefinition Width="*"/>
        </Grid.ColumnDefinitions>
        <Grid.RowDefinitions>
            <RowDefinition Height="*"/>
            <RowDefinition Height="80"/>
        </Grid.RowDefinitions>
        <Grid.Background>
            <LinearGradientBrush StartPoint="0.5,0" EndPoint="0.5,1">
                <GradientStop Color="Azure" Offset="0"/>
                <GradientStop Color="AliceBlue" Offset="0.3"/>
                <GradientStop Color="SkyBlue" Offset="1"/>
            </LinearGradientBrush>
        </Grid.Background>
        <StackPanel Grid.Column="0" Grid.RowSpan="2">
            <GroupBox x:Name="gbFont" Margin="4">
                <Grid>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="80"/>
                        <ColumnDefinition Width="*"/>
                    </Grid.ColumnDefinitions>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="32"/>
                        <RowDefinition Height="32"/>
                    </Grid.RowDefinitions>
                    <Label x:Name="lbFontSize" Height="24" Grid.Column="0" Grid.Row="0"/>
                    <ComboBox x:Name="cbFontSize" Margin="10,4,14,4" Width="200"
                              Grid.Column="1" Grid.Row="0" HorizontalAlignment="Left">
                        <ComboBoxItem Content="10" IsSelected="True"/>
                        <ComboBoxItem Content="12"/>
                        <ComboBoxItem Content="14"/>
                        <ComboBoxItem Content="16"/>
                        <ComboBoxItem Content="18"/>
                    </ComboBox>
                    <Label x:Name="lbFontType" Height="24" Grid.Column="0" Grid.Row="1"/>
                    <ComboBox x:Name="cbFontType" Margin="10,4,14,4" Width="200"
                              Grid.Column="1" Grid.Row="1" HorizontalAlignment="Left"
                              IsSynchronizedWithCurrentItem="True"
                              ItemsSource="{Binding Source={x:Static Member=Fonts.SystemFontFamilies}}">
                        <ComboBox.ItemTemplate>
                            <DataTemplate>
                                <TextBlock FontFamily="{Binding .}" Text="{Binding Source}"/>
                            </DataTemplate>
                        </ComboBox.ItemTemplate>
                    </ComboBox>
                </Grid>
            </GroupBox>
            <GroupBox x:Name="gbDisplay" Margin="4">
                <Grid>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="80"/>
                        <ColumnDefinition Width="*"/>
                    </Grid.ColumnDefinitions>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="32"/>
                        <RowDefinition Height="32"/>
                    </Grid.RowDefinitions>
                    <Label x:Name="lbReadingMode" Height="24" Grid.Column="0" Grid.Row="0"/>
                    <StackPanel Orientation="Horizontal" Grid.Column="1" Grid.Row="0">
                        <RadioButton x:Name="rbDay" Width="auto" IsChecked="True" VerticalAlignment="Center" 
                                     GroupName="readingMode" Margin="4"/>
                        <RadioButton x:Name="rbNight" Width="auto" VerticalAlignment="Center" 
                                     GroupName="readingMode" Margin="4"/>
                    </StackPanel>
                    <Label x:Name="lbLanguage" Height="24" Grid.Column="0" Grid.Row="1"/>
                    <ComboBox x:Name="cbLanguage" Width="200" Grid.Column="1" Grid.Row="1" 
                              HorizontalAlignment="Left" Margin="10,4,14,4">
                        <ComboBoxItem Content="Tiếng Việt" IsSelected="True"/>
                        <ComboBoxItem Content="English"/>
                    </ComboBox>
                </Grid>
            </GroupBox>
            <GroupBox x:Name="gbOnlineStorage" Margin="4" Padding="4">
                <StackPanel>
                    <StackPanel Orientation="Horizontal" Margin="4">
                        <Label x:Name="lbServices" Height="25" Width="auto"/>
                        <ComboBox x:Name="cbOnlineStorage" Width="120">
                            <ComboBoxItem Content="Google Drive" IsSelected="True"/>
                        </ComboBox>
                        <Button x:Name="btUpload" Width="72" Height="auto" Margin="8,4,8,4" Click="HandleBtUpload" />
                        <Button x:Name="btDownload" Width="72" Height="auto" Margin="8,4,4,4" Click="HandleBtDownload"/>
                    </StackPanel>
                </StackPanel>
            </GroupBox>
        </StackPanel>
        <StackPanel Grid.Column="1" Grid.Row="0" Visibility="Collapsed">
            <GroupBox Header="Please select your internet connection setting" Margin="4">
                <StackPanel Margin="4">
                    <RadioButton Content="Do not use any proxy" IsChecked="True" Margin="4"/>
                    <RadioButton Content="Use Internet Explorer proxy configuartion" Margin="4"/>
                    <RadioButton Content="Use this proxy:" Margin="4"/>
                    <StackPanel Orientation="Horizontal">
                        <Label Content="Address: " Margin="4"/>
                        <TextBox Text="Input here"  Width="80" VerticalAlignment="Center" Margin="4"/>
                        <Label Content="Port: " Margin="4"/>
                        <TextBox Text="0" VerticalAlignment="Center" Width="50" Margin="4"/>
                    </StackPanel>
                    <Grid>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="*"/>
                            <ColumnDefinition Width="1.5*"/>
                        </Grid.ColumnDefinitions>
                        <Grid.RowDefinitions>
                            <RowDefinition Height="*"/>
                            <RowDefinition Height="*"/>
                        </Grid.RowDefinitions>
                        <Label Content="Proxy username : " Margin="4" Grid.Column="0" Grid.Row="0"/>
                        <TextBox Text="Input Username" VerticalAlignment="Center" Width="100" Margin="4"
                                  Grid.Column="1" Grid.Row="0"/>
                        <Label Content="Proxy password : " Margin="4"  Grid.Column="0" Grid.Row="1"/>
                        <TextBox Text="Input password" VerticalAlignment="Center"  Width="100" Margin="4"
                                  Grid.Column="1" Grid.Row="1"/>
                    </Grid>
                </StackPanel>
            </GroupBox>
        </StackPanel>
        <StackPanel Orientation="Horizontal" Margin="4,4,4,4" HorizontalAlignment="Right"
                    Grid.Column="0" Grid.Row="1" Grid.ColumnSpan="2">
            <Button x:Name="lbSave" Background="Transparent" BorderThickness="0" Margin="4" Click="HandleSaveBt" >
                <Grid>
                    <Image Source="ButtonLarge.png" Height="32"/>
                    <Label x:Name="btSave" HorizontalAlignment="Center" VerticalAlignment="Center"/>
                </Grid>
            </Button>
        </StackPanel>
    </Grid>
</UserControl>
